package cn.q3.controller;

import cn.q3.service.EmpService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
@Controller
@RequestMapping("/emp")
public class EmpController {
@Resource
EmpService empService;
@RequestMapping("findall")
public String findAll(Model model, Integer pageNo){
    if (null == pageNo) {
        pageNo = 1;
    }
    model.addAttribute("pageUtil", empService.findAll(pageNo, 5));
    return "showEmp";
}
}
